# Contributor: Patrycja Rosa <alpine@ptrcnull.me>
# Maintainer: Patrycja Rosa <alpine@ptrcnull.me>
pkgname=android-udev-rules
pkgver=20231207
pkgrel=0
pkgdesc="Android udev rules list"
url="https://github.com/M0Rf30/android-udev-rules"
arch="noarch"
license="GPL-3.0-only"
depends="udev"
install="$pkgname.pre-install"
source="https://github.com/M0Rf30/android-udev-rules/archive/$pkgver/android-udev-rules-$pkgver.tar.gz"
options="!check" # no testsuite provided

prepare() {
	default_prepare

	# use plugdev as the group permitted to use adb devices
	sed -i 's/adbusers/plugdev/' 51-android.rules
}

package() {
	install -Dm644 51-android.rules -t "$pkgdir"/usr/lib/udev/rules.d/
}

sha512sums="
957704e64d7c34e9eab235a1223c8b2929ef6e079e5ba1aa083c5743684fc09711e0d4d3bd51f81c236ee444c4aea5c1c3fc9e613e1864ba0b56bbb6ce8afcf7  android-udev-rules-20231207.tar.gz
"
